diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index 0cdfabc..54ce188 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -23,3 +23,11 @@
 	This config enables implementation of driver-model regulator uclass
 	features for REGULATOR MAX77686. The driver implements get/set api for:
 	value, enable and mode.
+
+config DM_REGULATOR_FIXED
+	bool "Enable Driver Model for REGULATOR Fixed value"
+	depends on DM_REGULATOR
+	---help---
+	This config enables implementation of driver-model regulator uclass
+	features for fixed value regulators. The driver implements get/set api
+	for enable and get only for voltage value.
diff --git a/drivers/power/regulator/Makefile b/drivers/power/regulator/Makefile
index f9c4e6d..cc8326d 100644
--- a/drivers/power/regulator/Makefile
+++ b/drivers/power/regulator/Makefile
@@ -7,3 +7,4 @@
 
 obj-$(CONFIG_DM_REGULATOR) += regulator-uclass.o
 obj-$(CONFIG_DM_REGULATOR_MAX77686) += max77686.o
+obj-$(CONFIG_DM_REGULATOR_FIXED) += fixed.o
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
new file mode 100644
index 0000000..d053817
--- /dev/null
+++ b/drivers/power/regulator/fixed.c
@@ -0,0 +1,126 @@
+/*
+ *  Copyright (C) 2015 Samsung Electronics
+ *
+ *  Przemyslaw Marczak <p.marczak@samsung.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <fdtdec.h>
+#include <errno.h>
+#include <dm.h>
+#include <i2c.h>
+#include <asm/gpio.h>
+#include <power/pmic.h>
+#include <power/regulator.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct fixed_regulator_platdata {
+	struct gpio_desc gpio; /* GPIO for regulator enable control */
+};
+
+static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
+{
+	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct fixed_regulator_platdata *dev_pdata;
+	struct gpio_desc *gpio;
+	int ret;
+
+	dev_pdata = dev_get_platdata(dev);
+	uc_pdata = dev_get_uclass_platdata(dev);
+	if (!uc_pdata)
+		return -ENXIO;
+
+	/* Set type to fixed */
+	uc_pdata->type = REGULATOR_TYPE_FIXED;
+
+	/* Get fixed regulator gpio desc */
+	gpio = &dev_pdata->gpio;
+	ret = gpio_request_by_name(dev, "gpio", 0, gpio, GPIOD_IS_OUT);
+	if (ret)
+		debug("Fixed regulator gpio - not found! Error: %d", ret);
+
+	return 0;
+}
+
+static int fixed_regulator_get_value(struct udevice *dev)
+{
+	struct dm_regulator_uclass_platdata *uc_pdata;
+
+	uc_pdata = dev_get_uclass_platdata(dev);
+	if (!uc_pdata)
+		return -ENXIO;
+
+	if (uc_pdata->min_uV != uc_pdata->max_uV) {
+		debug("Invalid constraints for: %s\n", uc_pdata->name);
+		return -EINVAL;
+	}
+
+	return uc_pdata->min_uV;
+}
+
+static int fixed_regulator_get_current(struct udevice *dev)
+{
+	struct dm_regulator_uclass_platdata *uc_pdata;
+
+	uc_pdata = dev_get_uclass_platdata(dev);
+	if (!uc_pdata)
+		return -ENXIO;
+
+	if (uc_pdata->min_uA != uc_pdata->max_uA) {
+		debug("Invalid constraints for: %s\n", uc_pdata->name);
+		return -EINVAL;
+	}
+
+	return uc_pdata->min_uA;
+}
+
+static bool fixed_regulator_get_enable(struct udevice *dev)
+{
+	struct fixed_regulator_platdata *dev_pdata = dev_get_platdata(dev);
+
+	if (!dev_pdata->gpio.dev)
+		return false;
+
+	return dm_gpio_get_value(&dev_pdata->gpio);
+}
+
+static int fixed_regulator_set_enable(struct udevice *dev, bool enable)
+{
+	struct fixed_regulator_platdata *dev_pdata = dev_get_platdata(dev);
+	int ret;
+
+	if (!dev_pdata->gpio.dev)
+		return -ENOSYS;
+
+	ret = dm_gpio_set_value(&dev_pdata->gpio, enable);
+	if (ret) {
+		error("Can't set regulator : %s gpio to: %d\n", dev->name,
+		      enable);
+		return ret;
+	}
+	return 0;
+}
+
+static const struct dm_regulator_ops fixed_regulator_ops = {
+	.get_value	= fixed_regulator_get_value,
+	.get_current	= fixed_regulator_get_current,
+	.get_enable	= fixed_regulator_get_enable,
+	.set_enable	= fixed_regulator_set_enable,
+};
+
+static const struct udevice_id fixed_regulator_ids[] = {
+	{ .compatible = "regulator-fixed" },
+	{ },
+};
+
+U_BOOT_DRIVER(fixed_regulator) = {
+	.name = "fixed regulator",
+	.id = UCLASS_REGULATOR,
+	.ops = &fixed_regulator_ops,
+	.of_match = fixed_regulator_ids,
+	.ofdata_to_platdata = fixed_regulator_ofdata_to_platdata,
+	.platdata_auto_alloc_size = sizeof(struct fixed_regulator_platdata),
+};
